<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		用户名:<input type="text" id="username" value="" name="username"/><br/>
		密码:<input type="password" name="pwd" id="pwd" /><br/>
		性别:<input type="radio" id="sex1" name="sex" checked="nan" value="1"/>男
			<input type="radio"  id="sex2" name="sex" value="2" />女<br/>
		学院:<select name="collection" id="collection">
			<option value="" id="c1" name="c1">软工</option>
			<option value ="" id="c2" name="c1">医护</option>
			<option value ="" id="c3" name="c1">学前</option>
			<option value ="" id="c4" name="c1">信制</option>
		</select><br/>
		爱好:
		<input type="checkbox" name="hobit" id="hobit1" value="" checked="pe" />体育
		<input type="checkbox" name="hobit" id="hobit2" value="" />游戏
		<input type="checkbox" name="hobit" id="hobit3" value="" />旅游
		<br/>
		自我介绍:<textarea rows="8" cols="10" name="controduce" id="controduce">
		
		</textarea>
		<br/>
		<input type="submit" id="提交" name="提交" />
		
	</body>
	<script type="text/javascript">
		// 3.新制作一个注册页面，要求：
		//       3.1 包含用户名，密码，性别，学院，爱好，自我介绍及提交按钮
		//       3.2 包含:输入框，密码框，单选框，多选框，文本域，下拉列表
		//       3.3 每个需要提交的标签都要有name值
		//       3.4 按照name的方式查找各个元素
		var  a= document.getElementsByName('username')
		console.log(a)
		var  b= document.getElementsByName('pwd')
		console.log(b)
		var  c= document.getElementsByName('sex')
		console.log(c)
		var  d= document.getElementsByName('collection')
		console.log(d)
		var  e= document.getElementsByName('hobit')
		console.log(e)
		var  f= document.getElementsByName('controduce')
		console.log(f)
		var  g= document.getElementsByName('提交')
		console.log(g)
		//       3.5 按照标签的方式查找各个元素
		var  a1= document.getElementById('username');
		console.log(a1);
		var  a2= document.getElementById('pwd');
		console.log(a2);
		var  a3= document.getElementById('sex1');
		console.log(a3);
		var a9=document.getElementById('sex2')
		console.log(a9)
		var  a41= document.getElementById('c1');
		console.log(a41);
		var  a42= document.getElementById('c2');
		console.log(a42);
		var  a43= document.getElementById('c3');
		console.log(a43);
		var  a44= document.getElementById('c4');
		console.log(a44);
		var a5 = document.getElementById('hobit1');
		console.log(a5);
		var a52 = document.getElementById('hobit2');
		console.log(a52);
		var a53 = document.getElementById('hobit3');
		console.log(a53);
		var  a6= document.getElementById('controduce');
		console.loga6;
		var  a7= document.getElementById('提交');
		console.log(a7);
	</script>
</html>
